/*
 * Copyright (c) 2025 EasyAdmin
 * All rights reserved.
 *
 * This file is part of the [EasAdmin] project.
 * Unauthorized copying of this file, via any medium, is strictly prohibited.
 * Proprietary and confidential.
 *
 * Author: EasyAdmin ( 1073602@qq.com )
 * Website: https://www.xhxiao.com
 */
package com.easy.module.system.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.easy.framework.common.validate.Add;
import com.easy.framework.common.validate.Update;
import com.easy.framework.database.entity.BaseEntity;
import com.easy.framework.poi.annotation.Excel;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;
import lombok.Getter;
import lombok.Setter;

/**
 * 用户部门 实体
 *
 * @author EasyAdmin ( 1073602@qq.com )
 * @date 2025-08-19
 */
@Getter
@Setter
@TableName("sys_user_dept")
public class SysUserDept extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /**
     * 编号
     *
     */
    @Excel(name = "编号")

    @TableId(type = IdType.INPUT)
    private Long id;


    /**
     * 用户编号
     *
     */
    @Excel(name = "用户编号")
    @NotNull(message="用户编号不能为空", groups = {Add.class,Update.class})
    private Long userId;


    /**
     * 机构编号
     *
     */
    @Excel(name = "机构编号")
    @NotNull(message="机构编号不能为空", groups = {Add.class,Update.class})
    private Long orgId;


    /**
     * 部门编号
     *
     */
    @Excel(name = "部门编号")
    @NotNull(message="部门编号不能为空", groups = {Add.class,Update.class})
    private Long deptId;


    /**
     * 岗位编号
     *
     */
    @Excel(name = "岗位编号")
    @NotNull(message="岗位编号不能为空", groups = {Add.class,Update.class})
    private Long postId;


    /**
     * 机构名称
     */
    @TableField(exist = false)
    private String orgName;

    /**
     * 部门名称
     */
    @TableField(exist = false)
    private String deptName;

    /**
     * 岗位名称
     */
    @TableField(exist = false)
    private String postName;
}
